package cn.shop.transcation.ipWhitelistModule.mapper;

import cn.shop.transcation.ipWhitelistModule.entity.IpWhitelist;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author : 李一涵
 * @date : Created in 2021-11-8 14:01
 * @description : mapper
 */
@Mapper
public interface IpWhitelistMapper extends BaseMapper<IpWhitelist> {

	/**
	 * 批量删除并更新操作人和操作时间
	 */
	int batchDeleteWithFill(@Param(Constants.ENTITY) IpWhitelist param, @Param(Constants.WRAPPER) Wrapper<IpWhitelist> wrapper);

	/**
	 * 批量设置白名单
	 *
	 * @param ipList
	 * @param userId
	 * @return
	 * @author jzw
	 * @since 2022/2/23 11:24
	 */
	Integer save(@Param("ipList") List<IpWhitelist> ipList, @Param("userId") Long userId);
	/**

	* 清除数据
	* @author 王鹤然
	* @date 2023/1/30 0030 下午 12:12
	 * @param clearTime
	 * @return boolean
	*/
    boolean clearData(Object clearTime);
}
